<%@ page contentType="text/html; charset=utf-8" language="java" import="java.util.*" pageEncoding="utf-8" errorPage="" %>
<%@ page import="com.club325.voicemicroblog.domain.ShortMSG" %>
<%@ page import="java.text.*" %>
<%@ page session="false" %>

<%
	HttpSession session = request.getSession(false);
	String username = null;
	if (session == null) {
		response.sendRedirect("/Microblog/pages/timeout.html");
		return;
	}
	username = (String)session.getAttribute("username");
	if (username == null) {
		response.sendRedirect("/Microblog/pages/timeout.html");
		return;
	}
	
	ShortMSG mes = (ShortMSG)request.getAttribute("shortmessage");
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/frame.dwt.jsp" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<meta http-equiv="Keywords" content="Microblog,Vioce,blog" />
<meta http-equiv="Description" content="Voice Microblog" />

<!-- InstanceBeginEditable name="doctitle" -->
<title>查看短信息</title>
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="head" -->
<link href="/Microblog/styles/user_message.css" rel="stylesheet" type="text/css" />
<!-- InstanceEndEditable -->
<link href="/Microblog/styles/global.css" rel="stylesheet" type="text/css" />
<link href="/Microblog/styles/blank.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div class="main">
<!-- InstanceBeginEditable name="EditRegion_main" -->
  <h1>查看短信息... </h1>
  <table width="600" border="0" cellpadding="0" cellspacing="10" class="letter_contents">
    <tr>
      <th width="120" scope="row">发件人 :</th>
      <td width="450"><%= mes.getSenderID() %></td>
    </tr>
    <tr>
      <th scope="row">收件人 :</th>
      <td><%= mes.getRecieverID() %></td>
    </tr>
    <tr>
      <th scope="row">时间 :</th>
      <%
      		Date date = mes.getModifiedDate();
			if (date != null)
			{
				SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
	  %>
      <td><%= df.format(date) %></td>
      <%
        	}
      %>
    </tr>
    <tr>
      <th scope="row">标题 :</th>
      <td><%= mes.getTitle() %></td>
    </tr>
    <tr>
      <th scope="row">内容 :</th>
      <td>
        <div class="contents"><%= mes.getContent() %></div>
      </td>
    </tr>
  </table>
  <h3><a href="/Microblog/MessageListServlet">返回</a></h3>
<!-- InstanceEndEditable -->
</div>
</body>
<!-- InstanceEnd --></html>
